package com.etc.jwt;

import lombok.Data;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;

@Data
public class JwtToken implements AuthenticationToken{


	private String username;

	private String jsonWebToken;

	public JwtToken(String username, String jsonWebToken) {
		this.username = username;
		this.jsonWebToken = jsonWebToken;
	}

	public JwtToken(String jsonWebToken) {
		this.jsonWebToken = jsonWebToken;
	}

	public JwtToken() {
	}

	@Override
	public Object getPrincipal() {
		return username;
	}

	@Override
	public Object getCredentials() {
		return jsonWebToken;
	}

}
